#include <stdio.h>
#include <mpi.h>
int main(int argc, char **argv)
{ 
	int rank, arr[3], i; 
	MPI_Init(&argc, &argv);   
	MPI_Comm_rank(MPI_COMM_WORLD, &rank); 
	if (rank == 0)  
		for(i=0;i<3;i++)
			arr[i] = i+1;
	MPI_Bcast(arr, 3, MPI_INT, 0, MPI_COMM_WORLD);
	printf("process %d receives:",rank);
	for(i=0;i<3;i++)
		printf("%d ",arr[i]);
	putchar('\n');
	MPI_Finalize(); 
	return 0; 
} 